package com.microframework.netty.enums;

import java.io.Serializable;

//命令消息
public class CommandMessage implements Serializable {
	private static final long serialVersionUID = 1L;

	private CommandType type;
	private Object payload;
	private long timestamp;

	public CommandMessage(CommandType type, Object payload) {
		this.type = type;
		this.payload = payload;
		this.timestamp = System.currentTimeMillis();
	}

	public CommandType getType() {
		return type;
	}

	public void setType(CommandType type) {
		this.type = type;
	}

	public Object getPayload() {
		return payload;
	}

	public void setPayload(Object payload) {
		this.payload = payload;
	}

	public long getTimestamp() {
		return timestamp;
	}

	public void setTimestamp(long timestamp) {
		this.timestamp = timestamp;
	}

}